<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" charset="utf-8">
	$.messager.progress({
		text : '数据加载中....',
		interval : 100
	});

	$(function(){
		$(".userType").live("change",function(){
			var type = $(".userType").val();
			$(".role").html("<input name='roid' style='width: 145px;' />");
			var roid = $('input[name=roid]');
			var roleIdsCombobox = roid.combobox({
				url : '${pageContext.request.contextPath}/qxgl/roleAction!noAuth_combobox.html?vRole.type='+type,
				valueField : 'id',
				textField : 'name',
				multiple : false,
				editable : false,
				panelHeight : 'auto',
				onLoadSuccess : function() {
					parent.$.messager.progress('close');
				}
			});
		});
	})
</script>
<div style="padding: 5px;">
	<form id="userForm" method="post">
		<table class="tableForm">
			<tr>
				<th style="width: 100px;">用户类型</th>
				<td>
					<select class="userType" name="userType" style="width: 145px;">
						<c:if test="${sessionInfo.type==0}">
							<option value="1">经销商</option>
							<option value="2">代理商</option>
						</c:if>
						<c:if test="${sessionInfo.type==1}">
							<option value="3">店长</option>
							<option value="4">营业员</option>
						</c:if>
						<c:if test="${sessionInfo.type==3}">
							<option value="4">营业员</option>
						</c:if>
					</select>
				</td>
				<c:if test="${sessionInfo.type==1||sessionInfo.type==3}">
					<th style="width: 100px;">所属仓库</th>
					<td><input name="reid" style="width: 145px;" /></td>
				</c:if>
			</tr>
			<tr>
				<th style="width: 100px;">登录名</th>
				<td><input name="username" class="easyui-validatebox" data-options="required:'true',missingMessage:'请填写登录名称'" style="width: 145px;"/>
				</td>
				<th style="width: 100px;">所属角色</th>
				<td class="role"><input name="roid" style="width: 145px;" /></td>
			</tr>
			<tr>
				<th>密码</th>
				<td><input name="password" type="password" class="easyui-validatebox" data-options="required:'true',missingMessage:'请填写登录密码'" style="width: 145px;"/>
				</td>
				<th>重复密码</th>
				<td><input type="password" class="easyui-validatebox" data-options="required:'true',missingMessage:'请再次填写密码',validType:'eqPassword[\'#userForm input[name=password]\']'" style="width: 145px;"/>
				</td>
			</tr>
			<tr>
				<th style="width: 100px;">有效起始时间</th>
				<td><input name="validDate" class="easyui-datebox" data-options="required:'true',editable:false" style="width: 145px;" />
				</td >
				<th style="width: 100px;">有效结束时间</th>
				<td><input name="expiryDate" class="easyui-datebox" data-options="required:'true',editable:false" style="width: 145px;" />
				</td>
			</tr>
			<tr>
				<th style="width: 100px;">用户状态</th>
				<td>
					<select name="status" style="width: 145px;">
						<option value="1">有效用户</option>
						<option value="2">无效用户</option>
					</select>
				</td>
				<th style="width: 100px;">真实姓名</th>
				<td><input name="realName" style="width: 145px;"/>
				</td>
			</tr>
			<tr>
				<th style="width: 100px;">性 别</th>
				<td><input name="sex" style="width: 145px;" />
				</td>
				<th style="width: 100px;">生日</th>
				<td><input name="birthday" class="easyui-datebox" style="width: 145px;" />
				</td>
			</tr>
			<tr>
				<th style="width: 100px;">手机</th>
				<td><input name="mobile" style="width: 145px;"/>
				</td>
				<th style="width: 100px;">职务</th>
				<td><input name="job" style="width: 145px;"/>
				</td>
			</tr>
			<tr>
				<th style="width: 100px;">雇佣性质</th>
				<td><input name="employType" style="width: 145px;"/>
				</td>
				<th style="width: 100px;">部 门</th>
				<td><input name="dept" style="width: 145px;" />
				</td>
			</tr>
			<tr>
				<th style="width: 100px;">家庭地址</th>
				<td><input name="adress" style="width: 145px;"/>
				</td>
				<th style="width: 100px;">家庭电话</th>
				<td><input name="tel" style="width: 145px;" />
				</td>
			</tr>
		</table>
	</form>
</div>